package br.com.digidata.modelo;

import java.sql.*;

public class ConexaoBD {
  private static Connection db;
  
  public static Connection getConnection(){
	    	try {
	        	Class.forName("com.mysql.jdbc.Driver"); 
                        String url = "jdbc:mysql://localhost/clinica_medica";
                        String user = "clinica_medica";
                        String pass = "cl1n1c4_m3d1c4"; 
                        db = DriverManager.getConnection(url,user,pass); 
	        } catch (SQLException e ) {
	        	System.out.print("SQLException (" + new java.util.Date() + "): " + e);
	        } catch(ClassNotFoundException e){ 
	        	System.out.println("ClassNotFoundException (" + new java.util.Date() + "): " + e); 
	        } 
    	return db;    	
    }	
}